up: programming - HTML  
HTML
radio button
What links here?
Radio buttons come in groups. They are bound together as a group by having the same name:
<INPUT TYPE="radio" NAME="rad" VALUE="radio_button1">foo
<INPUT TYPE="radio" NAME="rad" VALUE="radio_button2">bar
<INPUT TYPE="radio" NAME="rad" VALUE="radio_button3">zot
<INPUT TYPE="radio" NAME="rad" VALUE="radio_button4">harry


Gives:

foo
bar
zot
harry


A particular radio button can be preselected with the "CHECKED" attribute:

<INPUT TYPE="radio" NAME="rad" Value="rad_button1" CHECKED>


Or with Javascript:

form.rad[0].checked = true;  // sets to first button in the rad group


Finding the selected radio button with Javascript:

function test_radio_button (form){
    for (Count = 0; Count < 3; Count++) {
        if (form.rad[Count].checked)
            break;
    }
    alert ("Button " + Count + " is selected");
}
programming - HTML - radio button
filename:programming - HTML - radio button
filename:programming%20%2D%20HTML%20%2D%20radio%20button
last edit:November 09 2012 12:33:10 (4195 days ago)
ct = 1714948818.000000 = May 05 2024 18:40:18
ft = 1352482390.000000 = November 09 2012 12:33:10
dt = 362466428.000000